package com.common;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.text.style.ClickableSpan;
import android.view.View;
import android.widget.Toast;

public class SpanURL  extends ClickableSpan {
	private String mUrl;  
 
 
	   public SpanURL(String url) {	 
	            mUrl =url;  
	            
	        }  
	 
	        @Override 
	        public void onClick(View widget) {
 
	            // TODO Auto-generated method stub	 
	            //Toast.makeText(widget.getContext(), "hello!",Toast.LENGTH_LONG).show();
	            Uri uri = Uri.parse(mUrl); 
	            widget.getContext().startActivity(new Intent(Intent.ACTION_VIEW,uri));
	        }  

}
